//
//  printCard.c
//  Testat_5
//
//  Created by Benno Lauther on 21.11.13.
//
//

#include <stdio.h>
#include "coreDefines.h"
/**
 * print a given card
 **/
int printCard(int card) {
    int colour = card / NR_TYPES;
    int type = card % NR_TYPES;
    
    /* print colour */
    if (colour == HEARTS)
        printf("HEARTS ");
    else if (colour == DIAMONDS)
        printf("DIAMONDS ");
    else if (colour == CLUBS)
        printf("CLUBS ");
    else
        printf("SPADES ");
    
    /* print type of card */
    if (type >= SEVEN && type <= TEN)
        printf("%d", 7 + type - SEVEN);
    else if (type == JACK)
        printf("JACK");
    else if (type == QUEEN)
        printf("QUEEN");
    else if (type == KING)
        printf("KING");
    else
        printf("ACE");
    
    return card;
}


int printColor(int color)
{
    /* print colour */
    if (color == HEARTS)
        printf("HEARTS ");
    else if (color == DIAMONDS)
        printf("DIAMONDS ");
    else if (color == CLUBS)
        printf("CLUBS ");
    else
        printf("SPADES ");
    
    return color;
}